package com.sanyang.pda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sanyang.pda.bean.StockStatisticsBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;
import com.wangshen.projectbase.R;

import java.util.List;

public class StockStatisticsListAdapter extends BaseAdapter<StockStatisticsBean.StatisticsByStoragebinListBean> {
    public StockStatisticsListAdapter(int layoutResId, @Nullable List<StockStatisticsBean.StatisticsByStoragebinListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, StockStatisticsBean.StatisticsByStoragebinListBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_title,item.getStoragebinId());
        helper.setText(R.id.tv_inventory_profit,item.getYinCount()+"");
        helper.setText(R.id.tv_inventory_losses,item.getKuiCount()+"");
        if (item.getIsCounted() == 1){
            helper.setText(R.id.tv_state,getContext().getString(R.string.yipandian));
        }else {
            helper.setText(R.id.tv_state,getContext().getString(R.string.weipandian));
        }
       // helper.setText(R.id.tv_state,item.getStoragebinId());

    }
}
